/* COPYRIGHT NOTICE
 * Function  ：
 * Author    ：_JingJing_ https://ruajingjing.top/ 
 * Work Path : /home/zjq/Documents/gitee/code-learning/C语言入门/Scrips/1127.c
 * CreateDate：2022/05/18 12:07
 */
// 验证尼科彻斯定理，即：任何一个整数m的立方都可以写成m个连续奇数之和。
#include <stdio.h>

int main ()
{
    int trip(int PInumber);
    int PI;
    scanf("%d",&PI);
    for (int i = 1; i <= trip(PI); i=i+2) {
        int MultSum=0,MultCord=0;
        for (int j = i; MultCord <= PI; j=j+2) {
            MultSum=MultSum+j;
            MultCord=MultCord+1;
            if (MultCord==PI && MultSum==trip(PI)) {
                printf("%d*%d*%d=%d=", PI,PI,PI,trip(PI));
                for (int k = i; k < j; k=k+2) {
                    printf("%d+",k);
                }
                printf("%d\n",j);
                break;
            }
        }
    }
    return 0;
}

int trip(int PInumber)
{
    int tripNum;
    tripNum = PInumber * PInumber * PInumber;
    return tripNum;
}

